<?php

include dirname(__FILE__).'/header.php';

?>
<body>
	<div style="background-color: #00F;">
		<div class="span-6 last">&nbsp;</div>
		<div id="twocolparent" style="background-color: <?php echo $body_bgcolor; ?>">
			
			

		<?php if ($pagelink=="cwelcome" || is_numeric($pagelink)) {?>
			<div id="side-links" class="span-5" style="background-color: <?php echo $links_bgcolor; ?>">
				<ul>
					<li><a style="color:<?php echo $sidelink_color?>;" href="cwelcome">Welcome</a>
					</li>
				<?php 
				 foreach(array_keys($links) as $link){
					
					echo '<li ><a style="color:'.$sidelink_color.';" href="'.$links[$link].'">'.$link.'</a></li>';
					
				}
				
				?>
				<li ><a style="color:<?php echo $sidelink_color?>;" href="checkstatus">Check Status</a></li>
				<li ><a style="color:<?php echo $sidelink_color?>;" href="contactus">Contact Us</a></li>
			</ul>
			</div>
			<div style="background-color: <?php echo 	$page_bgcolor; ?>; min-height: 650px" id="page" class="span-22 last">&nbsp;</div>
			
			
			
			
		<?php }else{?>
		<div style="background-color: <?php echo 	$page_bgcolor; ?>; min-height: 650px" id="page" class="span-24 last">&nbsp;</div>

		<?php }?>
	</div>
		<div class="span-6 last">&nbsp;</div>

		<div style="clear: both"></div>
	</div>

</body>

<?php
include dirname(__FILE__).'/footer.php';
?>

<script type="text/javascript">
$(document).ready(function(){

	$.ajax({
		type:'POST',
		data:'&page=<?php echo $pagelink;?>&totalcharge=<?php echo $totalcharge;?>',
		url: "<?php print base_url(); ?>cart/loadpage",
		success :function(data){

			$('#page').html(data);
			$('#side-links').height($('#page').height());
		}
	});


});
</script>
